package com.lanyun.aicorrectassistant.basic.service.impl;

import com.lanyun.aicorrectassistant.basic.dao.StudentAssignmentsDao;
import com.lanyun.aicorrectassistant.basic.entity.StudentAssignments;
import com.lanyun.aicorrectassistant.basic.service.StudentAssignmentsService;
import org.springframework.stereotype.Service;
import jakarta.annotation.Resource;

import java.util.List;

/**
 * 学生作业表(StudentAssignments)服务实现
 *
 * @author makejava
 * @since 2025-05-12 01:54:21
 */
@Service
public class StudentAssignmentsServiceImpl implements StudentAssignmentsService {

    @Resource
    private StudentAssignmentsDao studentAssignmentsDao;

    @Override
    public StudentAssignments queryById(Long id) {
        return studentAssignmentsDao.queryById(id);
    }

    @Override
    public StudentAssignments queryByCondition(StudentAssignments condition) {
        return studentAssignmentsDao.queryByCondition(condition);
    }

    @Override
    public List<StudentAssignments> queryAllByCondition(StudentAssignments condition) {
        return studentAssignmentsDao.queryAllByCondition(condition);
    }

    @Override
    public List<StudentAssignments> page(StudentAssignments condition, int page, int pageSize) {
        return studentAssignmentsDao.page(condition, page, pageSize);
    }

    @Override
    public int insert(StudentAssignments entity) {
        return studentAssignmentsDao.insert(entity);
    }

    @Override
    public int update(StudentAssignments entity) {
        return studentAssignmentsDao.update(entity);
    }

    @Override
    public int deleteById(Long id) {
        return studentAssignmentsDao.deleteById(id);
    }

    @Override
    public Long count(StudentAssignments condition) {
        return studentAssignmentsDao.count(condition);
    }

    @Override
    public void batchInsert(List<StudentAssignments> assignments) {
        studentAssignmentsDao.insertBatch(assignments);
    }
}
